<div class='head'>
  <div class='title'>
    »  中国移动飞信
  </div>
  <div class='tools'>
    <%= link_to_remote "▶返回", 
          :update => 'fetion',
          :url => show_fetion_user_url(@user),
          :loading => small_loading('back_to_edit_fetion',:only_img => true),
          :method => :get,
          :html => {
            :class => :h,
            :id => :back_to_edit_fetion
          } %>
  </div>
</div>
<div id='fetion_body'>
  <% remote_form_for @user, 
        :update => 'fetion',
        :url => update_fetion_user_url(@user),
        :loading => small_loading('binding_my_fetion',:only_img => true),
        :method => :put,        
        :html => {
          :id => :fetion_form
        } do |f|
     %>
  <table width="700" cellspacing="4" cellpadding="3" border="0">
    <tbody>
      <tr>
        <td class="t px12">手机号</td>
        <td class="px12" colspan='2'>
          <%= f.text_field :mobile, :size => 26, :class => :text %>
        </td>              
      </tr>
      <tr>
        <td class="t px12">验证码</td>
        <td class="px12" width='310'>
           <div>
             <%= image_tag "bind_fetion_verify/#{current_user.id}.gif" %>
           </div>
           <div id="verify">             
             <%= text_field_tag :verify_code, '' , :size => 10, :class => :verify %>    
             <%= hidden_field_tag :mobile, @fetion_robot.mobile %>
             <%= link_to_remote "看不清？换一张",
                  :update => 'fetion',
                  :url => edit_fetion_user_url(current_user),
                  :method => :get,
                  :loading => small_loading('edit_fetion_link',:only_img => true),
                  :html => {
                    :class => :h,
                    :id => 'edit_fetion_link'
                  } %>
           </div>     
        </td>   
      </tr>
    </tbody>          
  </table>
  <div id='binding_my_fetion'>
    <button class="button positive" type="submit">
      <%= image_tag "users/user.png" %> 绑定我的飞信号   
    </button>  
  </div>  
  <% end %>
</div>  
<script type="text/javascript" charset="utf-8">
  <% if @error.present? %>
  alert("<%= t @error %>导致绑定失败，请重试");
  <% end %>
</script>